package com.linkhub.oms.data.sync.job;

import com.linkhub.oms.data.sync.service.BillListGenerateBizService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author Jaycle
 * @version 1.0.0
 * @description BillListGenerateJod
 * @date 2024/05/08日 20:08
 */
@Slf4j
@Component
public class BillListGenerateJod {
    @Resource
    private BillListGenerateBizService billListGenerateBizService;

    // 每月5号生成上个月5号至这个月4号的账单
    @Scheduled(cron = "0 0 1 5 * ?")
    public void generateBillListJob() {
        log.info("generateBillListJob start...");
        billListGenerateBizService.generateBillList();
        log.info("generateBillListJob end...");
    }
}
